home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16702 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  34 lines

  1. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  2. Path: in2.uu.net!world!bobduff
  3. From: bobduff@world.std.com (Robert A Duff)
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Message-ID: <DppsHq.1Ar@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. References: <JSA.96Feb16135027@organon.com> <dewar.829048603@schonberg> <4kets3$ic0@news-s01.ny.us.ibm.net> <829194658snz@tsys.demon.co.uk>
  8. Date: Thu, 11 Apr 1996 20:20:13 GMT
  9.  
  10. In article <829194658snz@tsys.demon.co.uk>,
  11. Tom Wheeley  <tomw@tsys.demon.co.uk> wrote:
  12. >What Robert is complaining about is that he is reading a 68 byte file by
  13. >requesting 1000 bytes; and that in his opinion, read should stop reading
  14. >at the end of the file, and return control.
  15.  
  16. No, I think Robert is complaining (quite correctly) that the
  17. documentation is unclear on this point.  You shouldn't have to rely on
  18. common sense to know what 'read' does in various error cases, or to know
  19. which cases are in fact considered errors.  The problem is that
  20. everybody's common sense doesn't match everybody else's, at least not in
  21. all cases.
  22.  
  23. >Myself, I would see this auto-stop idea as a _feature_ of read().  features
  24. >can only be relied upon portably if they are positively documented in POSIX.
  25. >This feature is not therefore portable, as POSIX is muddy on the matter.
  26. >
  27. >I suppose in c.l.c speak, it would be called `implementation-defined'.
  28.  
  29. If POSIX wants to make it implementation defined, or undefined, or
  30. whatever, then it should say so explicitly.  Making something undefined
  31. by forgetting to define it is bad style.
  32.  
  33. - Bob
  34.